package com.example.hao.retrofit;


import com.example.hao.retrofit.pojo.User;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface IUserRequest {

    //http://192.168.3.100:8080/home/register
    @POST("register")
    @FormUrlEncoded//表示需要提交 From 表单数据(POST 键值对)
    Call<ResultData> register(@Field("userName") String userName, @Field("psw") String psw);

    //baserUrl/register?userName = 值
    @GET("getUser")
    Call<ResultData<User>> getUser(@Query("userName") String userName);

}
